package com.sx.service.user;

import com.sx.basic.IBasicService;
import com.sx.entity.user.AmountEntity;

import java.math.BigDecimal;

/**
 * @author AdinZ
 * @date 2020/11/18 18:20
 * 用户资金服务层
 */
public interface IAmountService extends IBasicService<AmountEntity,Long> {
    /**
     * 获取账户金额
     * @param amountType 金额类型
     * @param uid 用户id
     * @return
     */
    AmountEntity get(AmountEntity.AmountType amountType, long uid);
    /**
     *  创建用户金额资料
     * @param amountType 金额类型
     * @param uid 用户id
     * @param amount 初始金额
     */
    AmountEntity createAmount(AmountEntity.AmountType amountType, long uid, BigDecimal amount);

    /**
     * 账户金额变动
     * @param amountType 变动金额类型
     * @param uid 用户id
     * @param amount 变动金额, 正数 ,或负数
     */
    AmountEntity amountChange(AmountEntity.AmountType amountType, long uid, BigDecimal amount);



}
